<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateConfigProductsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('config_products', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name','50');
            $table->text('content')->nullable();
            $table->string('token','50');
            $table->string('capacity','50');
            $table->decimal('hostrate','4',1)->default(0.8);
            $table->string('start_time','50')->default('2020-05-15 00:00:00')->comment('开始时间');
            $table->integer('days')->default(1095);
            $table->engine = 'InnoDB';
            $table->charset = 'utf8';
            $table->collation = 'utf8_unicode_ci';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('config_products');
    }
}
